﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="password.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.password" %>
<%@ Register assembly="Book38.Net.CustomControl" namespace="Book38.Net.CustomControl" tagprefix="cc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <script language=javascript>
    function submitform()
    {
      if($F("txt_newpass").value!=$F("txt_newpass2").value)
      {
        alert("新密码录入不匹配！请重新录入。");
        return false;
      }
      else
      {
      return true;
      }
    }
    </script>
</head>
<body>
    <form id="formData" runat="server" onsubmit="return submitform();">
    <div>
    <table width="100%" cellpadding="0" cellspacing="0" class="title-table">
            <tr class="bttn">
                <td align="left" style="width:80%;">
                    当前位置：密码修改</td>
                    <td align="right" style="width:20%;">
                        <img alt="返回" src="../Image/return.gif" onclick="history.back();" style="cursor:hand;" /></td>
            </tr>
        </table>
        <br />
        <table width="100%" class="main-table" cellspacing="1">
            <tr class="line-even">
                <td style="width: 38%; text-align: right">
                    旧密码：</td>
                <td>
                    <cc2:WebTextBox ID="txt_oldpass" runat="server" TextMode="Password" Width="150px" CssClass="text-line"></cc2:WebTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_oldpass"
                        Display="Dynamic" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txt_oldpass"
                        Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="[a-zA-Z0-9_]{5,15}"></asp:RegularExpressionValidator><div id="err_oldpass" style="display:inline;"></div></td>
            </tr>
            <tr class="line-odd">
                <td style="width: 38%; text-align: right">
                    新密码：</td>
                <td>
                    <cc2:WebTextBox ID="txt_newpass" runat="server" TextMode="Password" Width="150px" CssClass="text-line"></cc2:WebTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_newpass"
                        Display="Dynamic" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txt_newpass"
                        Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="[a-zA-Z0-9_]{5,15}"></asp:RegularExpressionValidator><div id="err_newpass" style="display:inline;"></div></td>
            </tr>
           <tr class="line-even">
                <td style="width: 38%; text-align: right">
                    确认新密码：</td>
                <td>
                    <cc2:WebTextBox ID="txt_newpass2" runat="server" TextMode="Password" Width="150px" CssClass="text-line"></cc2:WebTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_newpass2"
                        Display="Dynamic" ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txt_newpass2"
                        Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="[a-zA-Z0-9_]{5,15}"></asp:RegularExpressionValidator><div id="err_newpass2" style="display:inline;"></div></td>
            </tr>
           <tr class="line-odd">
                <td style="text-align: center" colspan="2">
                    &nbsp;<asp:Button ID="btn_submit" runat="server" Text="修改" CssClass="bttn" OnClick="btn_submit_Click"/>
                    <input id="Reset1" type="reset" value="重置" class="bttn" /></td>
            </tr>  
            <tr class="line-even">
                <td style="width: 38%; text-align: right">
                    </td>
                <td>
                    密码由5-15位字母、数字、下划线组成</td>
            </tr>
        </table>
    </div>
    </form>
   <script type="text/javascript">
   function checkform()
   {
    if ($F("txt_oldpass").value=="")
   {
    $F("err_oldpass").innerHTML="<font color=red>请输入旧密码</font>";
    $F("txt_oldpass").focus();
    return false;  
   } 
   else
   {
    $F("err_oldpass").innerHTML="";
   }
   if ($F("txt_newpass").value=="" || $F("txt_newpass").value.indexOf("'")!=-1)
   {
    $F("err_newpass").innerHTML="<font color=red>新密码不能为空或包含单引号</font>"; 
    $F("txt_newpass").focus();
    return false;  
   }
   else
   {
    $F("err_newpass").innerHTML=""; 
   }
   if ($F("txt_newpass2").value=="" || $F("txt_newpass2").value.indexOf("'")!=-1)
   {
    $F("err_newpass2").innerHTML="<font color=red>确认新密码不能为空或包含单引号</font>";  
    $F("txt_newpass2").focus();
    return false;  
   }
   else
   {
   $F("err_newpass2").innerHTML=""; 
   }
   if ($F("txt_newpass").value!=$F("txt_newpass2").value)
   {
    $F("err_newpass2").innerHTML="<font color=red>新密码与确认密码不相同</font>";  
    $F("txt_newpass").focus();
    return false;   
   }
   else
   {
    $F("err_newpass2").innerHTML=""; 
   }
   }
   </script> 
</body>
</html>




